<template>
	<div class="setings" id="setings">
		<div class="st_t1">
			数据概况
		</div>
		<div class="data_main">
			<div class="data_list1">
				<div class="data_name">累计留言数</div>
				<div>{{total.liuLnum}}</div>
			</div>
			<div class="data_list1">
				<div class="data_name">累计商家数</div>
				<div>{{total.shangjianum}}</div>
			</div>
			<div class="data_list1">
				<div class="data_name">累计查看数</div>
				<div>{{total.readnum}}</div>
			</div>
			<div class="data_list1">
				<div class="data_name">累计点赞数</div>
				<div>{{total.praisenum}}</div>
			</div>
			<div class="data_list1">
				<div class="data_name">累计保存数</div>
				<div>{{total.savenum}}</div>
			</div>
		</div>
		
		
		<div class="dataList">
			<div class="st_t1">
				数据记录
			</div>
			<datatable></datatable>
		</div>
		
	</div>
</template>

<script>
	
	import datatable from '../pannel/common_table'
	export default {
		name: 'setings',
		computed: {},
		data() {
			return {
				title: '',
				total:{
					liuLnum:'',
					praisenum:'',
					readnum:'',
					savenum:'',
					shangjianum:'',
				}
			}
		}, //定义变量
		components: {
			datatable
		}, //注册组件
		methods: { //方法都在这里
		},
		mounted() {
			var that = this;
			//获取banner
		},
		beforeCreate:function(){
			var that = this;
			this.lh_http('post', "tbLogin/queryDatas").done(function(res) {
				if(res.status) {
//					console.log(res)
					var totalNum=res.data.tbCount
					that.total.liuLnum=totalNum.liuLnum
					that.total.praisenum=totalNum.praisenum
					that.total.readnum=totalNum.readnum
					that.total.savenum=totalNum.savenum
					that.total.shangjianum=totalNum.shangjianum
				} else {
					alert(res.data);
				}
			})
		}
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
	.setings{
		text-align: left;
		.st_t1{
			line-height: 40px;
			font-size:24px;
			font-weight: normal;
			background:#ECECEC;
			padding-left:20px;
		}
		.data_main{
			border:#ECECEC solid 1px;
			width:100%;
			overflow: hidden;
			zoom:1;
			margin-top:40px;
			.data_list1{
				width:20%;
				float: left;
				text-align: center;
				line-height:40px;
				.data_name{
					font-size:20px;
				}
			}
		}
		.dataList{
			margin-top:150px;
		}
	}
</style>